public class BinayTree {
    static class TreeNode{
         public int data;
         public TreeNode left;
         public TreeNode right;
        public TreeNode(int data) {
            this.data = data;
        }
    }
    public  void  PreOrder(TreeNode root){
        if (root == null)return;
        System.out.println(root.data);
        PreOrder(root.left);
        PreOrder(root.right);
    }
    public  void  InOrder(TreeNode root){
        if (root == null)return;
        InOrder(root.left);
        System.out.println(root.data);
        InOrder(root.right);
    }
    public  void  PostOrder(TreeNode root){
        if (root == null)return;
        PostOrder(root.left);
        PostOrder(root.right);
        System.out.println(root.data); 
    }

}

